/*************************************************************************
	> File Name: 149.最后的单词长度.c
	> Author: xiangpeng cai
	> Mail: 
	> Created Time: Sun 04 Jul 2021 07:22:45 AM PDT
 ************************************************************************/

#include<stdio.h>
#include<string.h>

int ans;
char input[51][51];

int main() {
    int i= 0;
    while (scanf("%s", input[i])) {
        ans = strlen(input[i]);
        printf("%d\n", ans);
        i++;
    }

    printf("%d\n", ans);
    return 0;
}

